<%@page import="com.qmerak.entity.MemberEntity"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户注销</title>
<link rel="stylesheet" type="text/css"
	href="../../css/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../../css/themes/icon.css" />
<script type="text/javascript" src="../../js/jquery-1.7.2.js"></script>
<script type="text/javascript"
	src="../../js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../js/ListData.js"></script>
<script type="text/javascript" src="../../js/util.js"></script>
<script type="text/javascript">
	$(function() {
	})
	function loadDatas() {
		var condition = "";
		var panel = $("#conditionPanel").panel("body");
		var name = $("#name", panel).val();
		if ("undefined" != name && "" != name) {
			condition += " name='" + name + "'";
		}
		var idNumber = $("#idNumber", panel).val();
		if ("undefined" != idNumber && "" != idNumber) {
			if ("" != condition) {
				condition += " and ";
			}
			condition += " idNumber='" + idNumber + "'";
		}
		var sexual = $("#sexual", panel).combobox("getValue");
		if ("undefined" != sexual && "" != sexual) {
			if ("" != condition) {
				condition += " and ";
			}
			condition += " sexual='" + sexual + "'";
		}
		var educational = $("#educational", panel).combobox("getValue");
		if ("undefined" != educational && "" != educational) {
			if ("" != condition) {
				condition += " and ";
			}
			condition += " educational='" + educational + "'";
		}
		var employMode = $("#employMode", panel).combobox("getValue");
		if ("undefined" != employMode && "" != employMode) {
			if ("" != condition) {
				condition += " and ";
			}
			condition += " employMode='" + employMode + "'";
		}
		var workUnit = $("#workUnit", panel).combobox("getValue");
		if ("undefined" != workUnit && "" != workUnit) {
			if ("" != condition) {
				condition += " and ";
			}
			condition += " workUnit='" + workUnit + "'";
		}
		var unionId = $("#unionId", panel).combobox("getValue");

		$.get("../../view/findMembers", {
			condition : condition
		}, function(str) {
			if (typeof str == "object" && str instanceof Array) {
				$('#tt').datagrid("loadData", str);
			}
		})
	}
	function logout() {
		$($('#tt').datagrid("getChecked")).each(function(i, row) {
			$.post("../../member/logout", row, function(str) {
				loadDatas();
			});
		});
	}
</script>
<style type="text/css">
body {
	margin: 0px;
	padding: 0px;
	width: 100%;
	height: 100%;
}
</style>
</head>
<body style="margin: 0">
	<div id="conditionPanel" class="easyui-panel"
		style="width: 800px; padding: 10px; text-align: left;"
		data-options="title:'查询条件',collapsible:true,collapsed:true">
		<table align="left" width="100%">
			<tr>
				<td nowrap="nowrap" width="100" align="right">姓名：</td>
				<td nowrap="nowrap" width="200" align="left"><input id="name"
					name="name" style="width: 200px;"></td>
				<td nowrap="nowrap" width="100" align="right">身份证号：</td>
				<td nowrap="nowrap" width="200" align="left"><input
					id="idNumber" name="idNumber" style="width: 200px;"></td>
			</tr>
			<tr>
				<!-- 				<td nowrap="nowrap" width="100" align="right">年龄：</td> -->
				<!-- 				<td nowrap="nowrap" width="200" align="left"><input id="age" -->
				<!-- 					name="age" style="width: 200px;"></td> -->
				<td nowrap="nowrap" width="100" align="right">性别：</td>
				<td nowrap="nowrap" width="200" align="left"><select
					name="sexual" id="sexual" class="easyui-combobox"
					data-options="panelHeight:'auto'">
						<option value="1">男</option>
						<option value="2">女</option>
				</select></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">学历/教育程度：</td>
				<td nowrap="nowrap" width="200" align="left"><select
					name="educational" id="educational" class="easyui-combobox"
					style="width: 150px;"
					data-options="
					data:list_degree,
					valueField: 'value',
					textField: 'text',
					panelHeight:'auto'
			"></select></td>
				<!-- 				<td nowrap="nowrap" width="100" align="right">工龄：</td> -->
				<!-- 				<td nowrap="nowrap" width="200" align="left"><input -->
				<!-- 					id="workAge" name="workAge" style="width: 200px;"></td> -->
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">用工形式：</td>
				<td nowrap="nowrap" width="200" align="left"><select
					name="employMode" id="employMode" class="easyui-combobox"
					style="width: 150px;"
					data-options="
					data:list_employ_mode,
					valueField: 'value',
					textField: 'text',
					panelHeight:'auto'
			"></select></td>
				<td nowrap="nowrap" width="100" align="right"></td>
				<td nowrap="nowrap" width="200" align="left"></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">所在工作机构名称：</td>
				<td nowrap="nowrap" width="200" align="left" colspan="3"><input
					id="workUnit" name="workUnit" class="easyui-combotree"
					data-options="multiple:false,url:'../../view/unitcombo'"
					style="width: 400px;"></td>
			</tr>
			<!-- 			<tr> -->
			<!-- 				<td nowrap="nowrap" width="100" align="right">所在工会组织机构名称：</td> -->
			<!-- 				<td nowrap="nowrap" width="200" align="left" colspan="3"><input -->
			<!-- 					id="unionId" name="unionId" class="easyui-combotree" -->
			<!-- 					data-options="multiple:false,url:'../../view/orgcombo'" -->
			<!-- 					style="width: 400px;" /></td> -->
			<!-- 			</tr> -->
		</table>
	</div>
	<hr>
	<div id="tb">
		<div style="float: left">
			<a href="#" class="easyui-linkbutton" data-options="plain:true"
				onclick="javascript:loadDatas()">查询</a>
		</div>
		<div style="clear: right;">
			<a href="#" class="easyui-linkbutton" data-options="plain:true"
				onclick="javascript:logout()">注销用户</a>
		</div>
	</div>
	<table id="tt" class="easyui-datagrid"
		data-options="singleSelect:false,rownumbers:true"
		style="width: 800px; height: 200px;">
		<thead>
			<tr>
				<th data-options="field:'id',width:80,checkbox:true"></th>
				<th data-options="field:'name',width:80">会员姓名</th>
				<th data-options="field:'idNumber',width:80">身份证号</th>
				<th
					data-options="field:'sexual',width:80,formatter:sexFormatter,editor:{
							type:'combobox'}">性别</th>
				<th
					data-options="field:'political',width:80,formatter:politicalFormatter,editor:{
							type:'combobox'}">政治面貌</th>
				<th
					data-options="field:'marital',width:80,formatter:maritalFormatter,editor:{
							type:'combobox'}">婚姻</th>
				<th
					data-options="field:'educational',width:80,formatter:educationalFormatter,editor:{
							type:'combobox'}">学历</th>
				<th data-options="field:'tel',width:80">办公电话</th>
			</tr>
		</thead>
	</table>
</body>
</html>